/**
 * Licensed to Open-Ones Group under one or more contributor license
 * agreements. See the NOTICE file distributed with this work
 * for additional information regarding copyright ownership.
 * Open-Ones Group licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a
 * copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package oog.product;

import java.util.List;

import org.apache.log4j.Logger;

/**
 * This Utility provides common methods.
 * @author Thach Le
 */
public final class Util {
    /** Minimum length of password . */
    private static final int PASSWD_MIN_LENGTH = 6;

    /** For logging. */
    static final Logger LOG = Logger.getLogger("Utility");

    /**
     * Avoid the caller make a new instance of Util.
     */
    private Util() {
    }

    /**
     * Check DataValidation of password.
     * @param passwd the String of password
     * @return true if the passwd has at least 6 character and
     *                            contain at least 1 digit and
     *                            contain at least an upper case character.
     *         Otherwise, return false.
     */
    public static boolean checkPasswd(String passwd) {
        boolean isValid = false;
        
        return isValid;
    }

    public static boolean isNNAndNB(String st) {
        if (st != null && !st.equals(""))
            return true;
        return  false;
    }
    
    public static boolean isNNandNB(List objList) {
        if (objList != null && objList.size() > 0)
            return true;
        return  false;
    }
    
    public static boolean isNNandNB(Object strObj) {
        if (strObj != null)
            return true;
        return  false;
    }
}
